package cn.yx.sys.remote.service.impl;

import cn.yx.sys.cond.SysI18nMessageCond;
import cn.yx.sys.dto.SysI18nMessageDto;
import cn.yx.sys.remote.cond.SysI18nMessageRemoteCond;
import cn.yx.sys.remote.dto.SysI18nMessageRemoteDto;
import cn.yx.sys.remote.mapping.SysI18nMessageRemoteMapping;
import cn.yx.sys.remote.service.SysI18nMessageRemoteService;
import cn.yx.sys.service.SysI18nMessageService;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * <p>国际化消息远程服务接口实现类</p>
 *
 * @author Wgssmart
 */
@DubboService
public class SysI18nMessageRemoteServiceImpl implements SysI18nMessageRemoteService {

    private final SysI18nMessageService sysI18nMessageService;

    public SysI18nMessageRemoteServiceImpl(SysI18nMessageService sysI18nMessageService) {
        this.sysI18nMessageService = sysI18nMessageService;
    }

    @Override
    public SysI18nMessageRemoteDto getOne(SysI18nMessageRemoteCond sysI18nMessageRemoteCond) {
        SysI18nMessageCond sysI18nMessageCond = SysI18nMessageRemoteMapping.INSTANCE.otherToCond(sysI18nMessageRemoteCond);
        SysI18nMessageDto sysI18nMessageDto = sysI18nMessageService.getOne(sysI18nMessageCond);
        return SysI18nMessageRemoteMapping.INSTANCE.dtoToOther(sysI18nMessageDto);
    }

}
